<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>sim.getPathLengths</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1>Regular API function</h1>
<h3 class=subsectionBar><a name="simGetPathLengths" id="simGetPathLengths"></a>sim.getPathLengths</h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Returns the lengths of a path. Each path point will have a corresponding length value (taken as the distance from the path's first point, along the path). See also the other <a href="../apiFunctions.htm#paths">path related functions</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn><div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div></div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div></div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>table[] pathLengths,float totalLength=sim.getPathLengths(table[] path,int dof,function distCallback=nil)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>path</strong>: the path, specified in row-major order, e.g. a path containing two 3D poses (position+quaternion) would be {x1,y1,z1,qx1,qy1,qz1,qw1,x2,y2,z2,qx2,qy2,qz2,qw2}</div>
<div><strong>dof</strong>: the size or dimension of path points, e.g. in case of a 3D pose, this would be 7</div>
<div><strong>distCallback</strong>: an optional function that takes as input two configurations, and returns the calculated distance between them. See also <a href="simGetConfigDistance.htm">sim.getConfigDistance</a></div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>pathLengths</strong>: the lengths corresponding to each path point</div>
<div><strong>totalLength</strong>: the total length of the path</div>
</td> 
</tr> 
</table> 


<br>
</td>
</tr>
</table>
</div>
</body>
</html>
